package com.songminju.jsong_beanwithsql.crud;

import java.util.List;

/**
@todo
@description
@author songminju
@date 2017年12月5日
*/
public class QueryOption<T> implements CrudOption<T>{

	private StringBuilder fields = new StringBuilder();
	private StringBuilder filters = new StringBuilder();
	private Object[] values = null;
	private String table = null;
	
	public QueryOption(String table) {
		this.table = table;
	}
	
	@Override
	public CrudOption<T> get(String field) {
		fields.append(field).append(",");
		return this;
	}

	@Override
	public CrudOption<T> set(String field) {
		return this;
	}

	@Override
	public CrudOption<T> filter(String filter) {
		filters.append(filter).append(",");
		return this;
	}

	@Override
	public CrudOption<T> values(Object... values) {
		this.values = values;
		return null;
	}

	@Override
	public T first() {
		return null;
	}

	@Override
	public long update() {
		return 0;
	}

	@Override
	public List<T> all() {
		return null;
	}

	@Override
	public long count() {
		return 0;
	}

}
